package generics;

import typeinfo.pets.*;

/**
 * @author 杨宇
 * @version 1.0 2016/10/20
 */
public class E01_PetsHolder {

    public static void main(String[] args) {
        Holder3<Pet> h3 = new Holder3<Pet>(new Mouse("Mickey"));
        System.out.println(h3.get());
    }
}

class Holder3<T> {
    private T a;

    public Holder3(T a) {
        this.a = a;
    }

    public T get() {
        return a;
    }

    public void set(T a) {
        this.a = a;
    }
}


